<template>
  <div class="ly_my_home_container">
    <div class="ly_my_home_wrapper">
      <!-- 顶部登录 -->
      <div class="ly_my_top_container">
        <!-- 背景部分 -->
        <div class="ly_my_top_wrapper"></div>
        <!-- 中间登录部分 -->
        <div class="ly_my_top_fontimg">
          <div class="ly_top_top_container">
            <div class="ly_top_left">
              <img src="@/assets/logo.png" alt="" />
            </div>
            <div class="ly_top_con">
              <span>177****6556</span>
              <van-icon name="edit" class="ly_my_top_icon" />
            </div>
            <div class="ly_top_right">
              <div @click="toYueKe">去约课</div>
            </div>
          </div>
          <div class="ly_top_bottom_container">
            <div @click="toStudy">
              <p class="ly_bottom_colorp">0</p>
              <p>我的特色课</p>
              <p class="ly_bottom_fontp">已购特色课程的学习</p>
            </div>
            <div @click="toCoach">
              <p class="ly_bottom_colorp">0</p>
              <p>一对一辅导</p>
              <p class="ly_bottom_fontp">我的一对一老师辅导</p>
            </div>
            <div @click="toRemaining">
              <p class="ly_bottom_colorp">0.00</p>
              <p>剩余学习币</p>
              <p class="ly_bottom_fontp">查看剩余学习币</p>
            </div>
          </div>
        </div>
      </div>
      <!-- 邀请好友 -->
      <div class="ly_yao_container">
        <div class="ly_yao_wrapper">
          <div class="ly_yao_left">
            <van-icon name="smile-o" />
          </div>
          <div class="ly_yao_con">
            <p>邀请好友注册APP,享多重好礼</p>
            <p>限时特惠,多邀多得</p>
          </div>
          <div class="ly_yao_right">
            <van-icon name="arrow" />
          </div>
        </div>
      </div>
      <!-- 课程相关 -->
      <div class="ly_ke_container">
        <div class="ly_ke_wrapper">
          <h6>课程相关</h6>
          <div class="ke_list_container">
            <div class="ke_list_wrapper">
              <div class="ke_list_tu_wen">
                <van-icon name="friends-o" class="ke_list_tu" />
                <div class="ke_list_wen">关注的老师</div>
              </div>
              <div class="ke_list_tu_wen">
                <van-icon name="fire-o" class="ke_list_tu" />
                <div class="ke_list_wen">我的收藏</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 订单相关 -->
      <div class="ly_ke_container">
        <div class="ly_ke_wrapper">
          <h6>订单相关</h6>
          <div class="ke_list_container">
            <div class="ke_list_wrapper">
              <div class="ke_list_tu_wen">
                <van-icon name="friends-o" class="ke_list_tu ke_list_tu_b" />
                <div class="ke_list_wen">课程订单</div>
              </div>
              <div class="ke_list_tu_wen">
                <van-icon name="fire-o" class="ke_list_tu ke_list_tu_b" />
                <div class="ke_list_wen">会员订单</div>
              </div>
              <div class="ke_list_tu_wen">
                <van-icon name="fire-o" class="ke_list_tu ke_list_tu_b" />
                <div class="ke_list_wen">约课订单</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 我的账户 -->
      <div class="ly_ke_container">
        <div class="ly_ke_wrapper">
          <h6>我的账户</h6>
          <div class="ke_list_container">
            <div class="ke_list_wrapper">
              <div class="ke_list_tu_wen">
                <van-icon name="friends-o" class="ke_list_tu ke_list_tu_r" />
                <div class="ke_list_wen">优惠券</div>
              </div>
              <div class="ke_list_tu_wen">
                <van-icon name="fire-o" class="ke_list_tu ke_list_tu_r" />
                <div class="ke_list_wen">学习卡</div>
              </div>
              <div class="ke_list_tu_wen">
                <van-icon name="fire-o" class="ke_list_tu ke_list_tu_r" />
                <div class="ke_list_wen">会员</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 自助服务 -->
      <div class="ly_ke_container">
        <div class="ly_ke_wrapper">
          <h6>自助服务</h6>
          <div class="ke_list_container">
            <div class="ke_list_wrapper">
              <div class="ke_list_tu_wen">
                <van-icon name="friends-o" class="ke_list_tu ke_list_tu_p" />
                <div class="ke_list_wen">我的消息</div>
              </div>
              <div class="ke_list_tu_wen">
                <van-icon name="fire-o" class="ke_list_tu ke_list_tu_p" />
                <div class="ke_list_wen">意见反馈</div>
              </div>
              <div class="ke_list_tu_wen">
                <van-icon name="fire-o" class="ke_list_tu ke_list_tu_p" />
                <div class="ke_list_wen">在线客服</div>
              </div>
              <div class="ke_list_tu_wen">
                <van-icon name="fire-o" class="ke_list_tu ke_list_tu_p" />
                <div class="ke_list_wen" @click="toMyOut">设置</div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Tabbar from "@/components/Tabbar";
export default {
  components: { Tabbar },
  name: "",
  props: [],
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
    this.isLogin();
  },
methods: {
    // 判断是否登录
    isLogin() {
      let user = localStorage.getItem("user");
      console.log(user);
      if (!user) {
        this.$router.push("/Login");
      }
    },
    // 去约课页面
    toYueKe() {
      this.$router.push("/Rcords");
    },
    // 去我的学习
    toStudy() {
      this.$router.push("/MyStudy");
    },
    // 去一对一辅导
    toCoach() {},
    // 去余额页面
    toRemaining() {
      this.$router.push("/Remaining");
    },
    // 去设置 退出登录
    toMyOut() {
      this.$router.push("/MyOut");
    },
  },
};
</script>
<style lang="scss" scoped>
.ly_my_home_container {
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.822);
}
.ly_my_home_wrapper {
  width: 100%;
  height: 120%;
}
.ly_my_top_container {
  width: 100%;
  height: 35vh;
  // background-color: chocolate;
  position: relative;
}
.ly_my_top_wrapper {
  width: 100%;
  height: 20vh;
  background-color: rgb(252, 85, 2);
  border-bottom-left-radius: 150px;
  border-bottom-right-radius: 150px;
}
.ly_my_top_fontimg {
  width: 90%;
  height: 30vh;
  background-color: #fff;
  border: 1px solid rgba(241, 237, 237, 0.822);
  position: absolute;
  top: 33px;
  left: 18px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.ly_top_top_container {
  width: 100%;
  height: 40%;
  // background-color: sandybrown;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ly_top_left {
  width: 25%;
  height: 100%;
  // background-color: seagreen;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ly_top_left img {
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 50%;
}
.ly_top_con {
  width: 55%;
  height: 100%;
  // background-color: tan;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 18px;
  .ly_my_top_icon {
    margin-left: 5px;
    color: red;
  }
}
.ly_top_right {
  width: 20%;
  height: 100%;
  // background-color: skyblue;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  div {
    padding: 5px 7px;
    color: #fff;
    background-color: orange;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
  }
}
.ly_top_bottom_container {
  width: 100%;
  height: 60%;
  // background-color: rgb(43, 207, 158);
  display: flex;
  align-items: center;
  justify-content: space-around;
  div {
    width: 33%;
    font-size: 14px;
    text-align: center;
    p {
      margin: 3px 0px;
    }
    .ly_bottom_colorp {
      color: orangered;
      font-size: 21px;
    }
    .ly_bottom_fontp {
      font-size: 12px;
      color: #ccc;
    }
  }
}
.ly_yao_container {
  width: 100%;
  height: 10vh;
}
.ly_yao_wrapper {
  width: 100%;
  height: 100%;
  border-radius: 40px;
  background-image: linear-gradient(to right, red, orange);
  display: flex;
  align-items: center;
  justify-content: center;
  .ly_yao_left {
    width: 20%;
    height: 100%;
    font-size: 40px;
    color: #fff;
    // background-color: palegreen;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .ly_yao_con {
    width: 60%;
    height: 100%;
    // background-color: palevioletred;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    p {
      color: #fff;
      font-size: 14px;
      font-weight: bold;
    }
  }
  .ly_yao_right {
    width: 20%;
    height: 100%;
    font-size: 40px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    // background-color: peachpuff;
  }
}
.ly_ke_container {
  width: 100%;
  height: 15vh;
  margin-top: 5px;
  // background-color: powderblue;
  display: flex;
  align-items: center;
  justify-content: center;
  .ly_ke_wrapper {
    width: 95%;
    height: 100%;
    // background-color: purple;
    border-bottom: 1px solid rgba(241, 237, 237, 0.822);
    h6 {
      text-align: left;
    }
    .ke_list_container {
      width: 100%;
      height: 79%;
      // background-color: rgb(252, 85, 2);
      .ke_list_wrapper {
        width: 100%;
        height: 100%;
        padding-top: 10px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        box-sizing: border-box;
      }
      .ke_list_tu_wen {
        width: 22%;
        height: 100%;
        text-align: center;
        .ke_list_tu {
          font-size: 30px;
          color: orange;
        }
        .ke_list_tu_b {
          color: yellow;
        }
        .ke_list_tu_p {
          color: pink;
        }
        .ke_list_tu_r {
          color: red;
        }
        .ke_list_wen {
          font-size: 13px;
        }
      }
    }
  }
}
</style>
